-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix(ngdocs): remove duplicate header ids #4778
Conversation
Is there anything I can do to ease the merge process? |
@mkolodny - what do you mean by the error is happening during |
Can you try with this fix: #4794? When this is in place, the ngdoc generation tests all pass. |
@petebacondarwin - I meant that the error during the Travis CI build happened while running |
With fix #4794 in place, I still see two errors when running
|
With the following pull request, the remaining two failing tests are now passing: #4796. |
What versions are you running? I don't get these errors and we don't see them in the CI server builds either: http://ci.angularjs.org/view/AngularJS/job/angular.js-angular-master/1788/console |
I'm running all of the versions from package.json and bower.json. The errors from #4796 don't happen when running |
I think the problem - looking at #4822 - is that marked has updated with a breaking change to 0.2.10. In environments where this dependency has been updated, the build is failing, yes? |
Nice catch. Yes, when generating the docs with marked@0.2.10, the documentation build fails. But it passes with marked@0.2.9. If it would be helpful to update marked to v0.2.10, the fixes in this pull request and #4796 together make the build pass with marked@0.2.10. |
Oh, I see now!
Given that marked is now adding ids automatically, we should either be overriding them or using them as-is. Not sure how marked does it but our format creates ids based on the hierarchy of headings. If marked doesn't do this then we need to override theirs. |
I think that's exactly right. Marked simply uses a header's text as its id, although it now allows header prefixes. See https://github.com/chjj/marked/blob/master/lib/marked.js#L850. I'll update this PR to override marked ids with our format. |
@mkolodny - reverting to 0.2.9 has made this change unnecessary right now. I am going to put it into the post 1.2 branch to look at when we choose to upgrade |
I'm sorry, but I wasn't able to verify your CLA signature. CLA signature is required for any code contributions to AngularJS. Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match. If you signed the CLA as a corporation, please let me know the company's name. Thanks a bunch! PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR. |
We are going to rewrite the doc gen tool so this PR is no longer relevant. |
Headers with ids are being given additional id attributes.
That's causing the test "ngdoc usage overview should supress description heading" to fail while building the documentation.
This prevents additional id attributes from being added to a header that already has an id.